package cn.lianxi.kaoshi._10_;

import java.io.IOException;
import java.util.Iterator;

import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;

public class IntSumReducer extends Reducer<Text, Text, Text, NullWritable> {

	@Override
	protected void reduce(Text key, Iterable<Text> values, Context context)
			throws IOException, InterruptedException {
		// 直接输出
		Iterator<Text> it = values.iterator();
		while (it.hasNext()) {
			context.write(it.next(), NullWritable.get());
		}
	}

}
